// 关于订单的接口：
import http from "@/utils/http";

// 所有订单列表的接口
export function getAllOrderListAPI() {
    return http({
        url: "/pet-adopt/admin/all-order-list",
    });
}

// 管理员订单列表接口
export function getAdminOrderListAPI() {
    return http({
        url: "/pet-adopt/admin/admin-order-list",
    });
}

// 争议订单列表接口
export function getDisputeListAPI() {
    return http({
        url: "/pet-adopt/admin/disputes",
    });
}

// 处理争议订单接口-data:表示form表单数据
export function postHandleDisputedOrders(data) {
    return http({
        url: "/pet-adopt/admin/dispute/resolve",
        method: "post",
        data: data,
    });
}

// 领养申请通过接口-领养申请页面
export function AdoptApplicationYesAPI(id) {
    return http({
        url: `/pet-adopt/pass-application/${id}`,
        method: "post",
    });
}
// 领养申请不通过接口-领养申请页面
export function AdoptApplicationNoAPI(id) {
    return http({
        url: `/pet-adopt/refuse-application/${id}`,
        method: "post",
    });
}

// 发货接口
export function putSendAPI(orderId, deliveryNum) {
    return http({
        url: "/pet-adopt/order-deliver",
        method: "put",
        params: {
            orderId,
            deliveryNum,
        },
    });
}
